Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: Lotus Notes with LDAP Connection
Feedback Type: Problem
Product Area: Domino Server
Technical Area: Application Development
Platform: Windows
Release: 8.5
Reproducible: Always

Objective :- Connect to lotus domino server with authorized credentials and after wards creation, updation & deletion of Users & Groups using LDAP.

Technology used :- C# via Code.

Here i am not using notes client to get connected and create users accordingly.

I am able to create users via LDAP Connection object of .NET Framework. Below is the code for it.
DirectoryAttribute Da;

string dn = String.Format("CN={0},O={1}", user, organization);


// create a request to add the new object
AddRequest AddRequest = new AddRequest(dn);

Da = new DirectoryAttribute("sn");
Da.Add(user);
AddRequest.Attributes.Add(Da);

Da = new DirectoryAttribute("cn");
Da.Add(user);
AddRequest.Attributes.Add(Da);

Da = new DirectoryAttribute("userpassword");
Da.Add(password);
AddRequest.Attributes.Add(Da);

//Add The Email Path
Da = new DirectoryAttribute("mailfile");
Da.Add(@"mail/" + user);
AddRequest.Attributes.Add(Da);

Da = new DirectoryAttribute("mailserver");
Da.Add("GVV/HCL");
AddRequest.Attributes.Add(Da);


// Add the objectClass attribute
Da = new DirectoryAttribute("objectclass");

Da.Add("dominoPerson");
Da.Add("inetOrgPerson");
Da.Add("organizationalPerson");
Da.Add("person");

AddRequest.Attributes.Add(Da);

// Send the request through the connection
m_Ldap.SendRequest(AddRequest);

Problem no 1:- I am not able to create user Email file folder and .ID file, for which I need to register the user that I dont know how to register a user via LDAP connection.

Problem no 2:- I am not able to create groups using this LDAP connection as a error comes up mentioning "An object class voilation occurs". Here is the code for creating groups.

DirectoryAttribute Da;

string dn = String.Format("CN={0},O={1}", user, organization);


// create a request to add the new object
AddRequest AddRequest = new AddRequest(dn);

Da = new DirectoryAttribute("Group name");
Da.Add("Test Group");
AddRequest.Attributes.Add(Da);

Da = new DirectoryAttribute("Group type");
Da.Add("Servers only ");
AddRequest.Attributes.Add(Da);



//Add The Email Path
Da = new DirectoryAttribute("Internet address");
Da.Add("WWW.GOOGLE.COM");
AddRequest.Attributes.Add(Da);

Da = new DirectoryAttribute("Mail Domain");
Da.Add("GVV/HCL");
AddRequest.Attributes.Add(Da);

Da = new DirectoryAttribute("Auto-Populate Method");
Da.Add("GVV/HCL");
AddRequest.Attributes.Add(Da);

Da = new DirectoryAttribute("Home Server(s)");
Da.Add("GVV/HCL");
AddRequest.Attributes.Add(Da);

Da = new DirectoryAttribute("Additional Members");
Da.Add("GVV/HCL");
AddRequest.Attributes.Add(Da);

Da = new DirectoryAttribute("Excluded Members");
Da.Add("GVV/HCL");
AddRequest.Attributes.Add(Da);

Da = new DirectoryAttribute("Members");
Da.Add("GVV/HCL");
AddRequest.Attributes.Add(Da);


Da = new DirectoryAttribute("Owners");
Da.Add("Abhishek Rai/HCL");
AddRequest.Attributes.Add(Da);

Da = new DirectoryAttribute("Administrators");
Da.Add("Abhishek Rai/HCL");
AddRequest.Attributes.Add(Da);

Da = new DirectoryAttribute("Allow foreign directory synchronization");
Da.Add("Yes");
AddRequest.Attributes.Add(Da);


Da.Add("groupOfNames");

AddRequest.Attributes.Add(Da);

// Send the request through the connection
m_Ldap.SendRequest(AddRequest);


Please guide me in the right direction as i need Help on this.


Feedback number WEBB8C5GCE created by ~Carol Eknuverings on 12/14/2010

Status: Open
Comments: Any Help will be appreciated..
Thanks in advance





Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS